package com.smag.system.service;

import com.smag.common.core.domain.entity.FarmProduct;
import com.baomidou.mybatisplus.extension.service.IService;
import com.smag.common.core.page.TableDataInfo;
import com.smag.system.domain.dto.ProductQueryDto;

import java.util.List;

/**
* @author hzqhzq
* @description 针对表【farm_product】的数据库操作Service
* @createDate 2023-03-31 10:19:04
*/
public interface FarmProductService extends IService<FarmProduct> {

    List<FarmProduct> selectFarmProductList(ProductQueryDto productQueryDto,Long userId);

    boolean updateTechAvatar(Long productId, String avatar);

    boolean insertFarmProduct(FarmProduct farmProduct);

    boolean updateFarmProduct(FarmProduct farmProduct);

    FarmProduct selectFarmProductById(Long productId);

    int deleteFarmProductByIds(Long[] ids);

    int updateFarmProductStatus(Long[] ids);

    List<?> selectRecFarmProduct();

    TableDataInfo listProducts(Integer pageNum, Integer pageSize, String productName, Long minPrice, Long maxPrice, Boolean sort, Long categoryId);

    FarmProduct selectFarmProductByArticleId(Long id);

    List<FarmProduct> selectAllProduct();

    Long selectProductIdByArticleId(Long id);

}
